package com.example.camunda.controller;

import com.example.camunda.service.ProcessEngineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/paymentRetrieval/")
@Slf4j
public class PaymentRetrievalController {
    @Autowired
    private ProcessEngineService processEngineService;

    @ResponseBody
    @RequestMapping("getDeployedRepository")
    public void getDeployedRepository() {
        processEngineService.getDeployedRepository();
    }

    @ResponseBody
    @RequestMapping("startProcess")
    public void startProcess() {
        processEngineService.startProcess();
    }

    @ResponseBody
    @RequestMapping("createTaskQuery")
    public void createTaskQuery() {
        processEngineService.createTaskQuery();
    }

    @ResponseBody
    @RequestMapping("completeTask")
    public void completeTask() {
        processEngineService.completeTask();
    }

    @ResponseBody
    @RequestMapping("findAllPendingTask")
    public void findAllPendingTask() {
        processEngineService.findAllPendingTask();
    }

    @ResponseBody
    @RequestMapping("createProcessInstanceQuery")
    public void createProcessInstanceQuery() {
        processEngineService.createProcessInstanceQuery();
    }

    @ResponseBody
    @RequestMapping("createHistoricTaskInstanceQuery")
    public void createHistoricTaskInstanceQuery() {
        processEngineService.createHistoricTaskInstanceQuery();
    }

    @ResponseBody
    @RequestMapping("findAllFinishedProcess")
    public void findAllFinishedProcess() {
        processEngineService.findAllFinishedProcess();
    }

    @ResponseBody
    @RequestMapping("deleteHistoricProcessInstance")
    public void deleteHistoricProcessInstance() {
        processEngineService.deleteHistoricProcessInstance();
    }
}
